<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>ThinkCMF话题讨论 {$topic_cat.cat_name}|{$site_seo_title}</title>
	<meta name="keywords" content="ThinkCMF话题讨论 , {$topic_cat.cat_name},{$site_seo_keywords}" />
	<meta name="description" content="ThinkCMF话题讨论, {$topic_cat.cat_name}  {$site_seo_description}">
    <tc_include file="Public:head" />
    <style>
	.avatar{width:40px;}
	.list-boxes>.pull-left{margin-right: 10px;}
	.topic-cat{margin-bottom: 10px;}
	.list-boxes{background: #fff;}
	.list-boxes{margin-bottom: 0px;border-bottom: 1px dashed #e5e5e5;}
	.list-boxes:last-child{border-bottom:none;}
	</style>
</head>
<body>
<tc_include file="Public:nav" />
<div class="container">
    
    <div class="row">
		<div class="span9">
			<php>
			$sort=I("get.sort",0,"intval");
			$catid=I("get.cat",0,"intval");
			$cat_all_active=empty($catid)?"btn-success":"";
			$cat_param=array();
			!empty($sort)?$cat_param['sort']=$sort:"";
			$sort_param=array();
			!empty($catid)?$sort_param['cat']=$catid:"";
			</php>
			<div style="margin: 0 0 10px 0;">
			
				<a href="{:U('topic/index/index',$cat_param)}" class="btn {$cat_all_active} topic-cat"> 全部 </a>
				<foreach name="topic_cats" item="vo">
					<php>
						$cat_param['cat']=$vo['id'];
						$cat_active=$vo['id']==$catid?"btn-success":"";
					</php>
					<a href="{:U('topic/index/index',$cat_param)}" class="btn topic-cat {$cat_active}"> {$vo.cat_name}</a>&nbsp;
				</foreach>
			
			</div>
			<ul class="nav nav-tabs" style="margin-bottom: 0px;">
                <li class="{$sort==0?'active':''}"><a href="{:U('topic/index/index',$sort_param)}"><i class="fa fa-list"></i> 最新发布</a></li>
                <php>$sort_param['sort']=1;</php>
                <li class="{$sort==1?'active':''}"><a href="{:U('topic/index/index',$sort_param)}"><i class="fa fa-comments"></i> 最新回复</a></li>
                <php>$sort_param['sort']=2;</php>
                <li class="{$sort==2?'active':''}"><a href="{:U('topic/index/index',$sort_param)}"><i class="fa fa-star"></i> 精华区</a></li>
            </ul>
			<div style="border: 1px solid #e5e5e5;border-top: none;">
				<php>$statuses=array("0"=>'已关闭','1'=>'未处理','2'=>'处理中','3'=>'已处理');</php>
				<volist name="topics" id="vo">
				<div class="list-boxes">
					<a class="pull-left" href="{:U('user/index/index',array('id'=>$vo['uid']))}" target="_blank">
					   <img class="media-object avatar" src="{:U('user/public/avatar',array('id'=>$vo['uid']))}" class="headicon" width="40" title="{$vo.user_nicename}"/>
					</a>
					<h2><a href="{:U('topic/index/index',array('cat'=>$vo['cid']))}">[{$vo.cat_name}]</a> <a href="{:U('topic/topic/index',array('id'=>$vo['id']))}" target="_blank">{$vo.title}</a></h2>
					<div class="pull-left">
						<span>浏览量：{$vo.hits}</span> <a href="{:U('topic/topic/index',array('id'=>$vo['id']))}#comments"  target="_blank">评论：<span>{$vo.comment_count}</span></a> 
					</div>
					<div class="pull-right">
						<span class=" time">{:date('m月d日  H:i',$vo['createtime'])}</span>
					</div>
				</div>
				</volist>
			</div>
			<div class="pagination">
				<ul>
					{$pager}
				</ul>
			</div>
		</div>
		<div class="span3">
			<php>
				$add_topic_param=array();
				!empty($catid)?$add_topic_param['cat']=$catid:"";
				
			</php>
			<a class="btn btn-warning btn-block" href="{:U('topic/topic/add',$add_topic_param)}"><i class="fa fa-plus"></i> 发表话题</a>
			<div class="headtitle">
          		<h2>分享</h2>
          	</div>
			<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tqf" data-cmd="tqf" title="分享到腾讯朋友"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_youdao" data-cmd="youdao" title="分享到有道云笔记"></a></div>
			<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"32"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=86835285.js?cdnversion='+~(-new Date()/36e5)];</script>          
        	<div class="headtitle">
        		<h2>网易云课堂</h2>
        	</div>
        	<ul class="nav nav-tabs nav-stacked">
			<li><a href="http://dwz.cn/2k5PYh" target="_blank">MySQL数据库管理工程师</a></li>
			</ul>
			
        	<div class="ad" style="margin-top: 20px;transform-origin:0% 0%;transform: scale(0.9);">
	        	<script type="text/javascript">
				/*案例展示侧边栏 300*250 创建于 2014-08-06*/
				var cpro_id = "u1648023";
				</script>
				<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
			</div>	
		</div>
    </div>
    
    
    <tc_include file="Public:footer" />
</div>

    
<!-- JavaScript -->
<tc_include file="Public:scripts" />
</body>
</html>